/*
 *  $Id: LynxKnight.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Light.Creatures {
    public class LynxKnight: CreatureCard {
        public LynxKnight(): base("001_l_c_lynx_knight") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Light;
            Value = 100;
            Damage = 4;
            Health = 5;
            AddManaCost(ElementType.Light, 5);
        }

        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add(new GuardianDamage(2));
        }

        private class GuardianDamage: Affects.ConditionalModDamage {
            public GuardianDamage(int value): base(value) {}

            public override string Id {
                get { return AffectManager.GetCardId<LynxKnight>(null); }
            }

            public override bool Accept(Creature hitter, AbstractObject victim) {
                return victim.HasFlag<Affects.Guardian>();;
            }

            public override Affect Clone() {
                return new GuardianDamage(Value);
            }
        }
    }
}
